package com.xinyuan.trade.Fragment;

import android.content.res.Resources;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xinyuan.trade.R;

/**
 * 分类
 * 
 * @author daiy
 * 
 */
public class NewFragment extends BaseFragment {

	private Resources resources;
	private RelativeLayout layout_top;
	private TextView tv_top;
	private ImageView iv_network;
	
	@Override
	public View onCreateView(LayoutInflater inflater,
			@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		View v = inflater.inflate(R.layout.fragment_new, container, false);

		resources = getResources();

		initView(v);

		return v;
	}

	private void initView(View v) {
		layout_top = (RelativeLayout) v.findViewById(R.id.layout_top);
		uiAdapter.setMargin(layout_top, LayoutParams.MATCH_PARENT, 60, 0, 0, 0, 0);
		
		tv_top = (TextView) v.findViewById(R.id.tv_top);
		uiAdapter.setTextSize(tv_top, 26);
		
		iv_network = (ImageView) v.findViewById(R.id.iv_network);
		uiAdapter.setMargin(iv_network, 420, uiAdapter.CalcHeight(420, 548, 364), 30, 10, 30, 10);
	}
}
